<#--去字符串中html标签,对html字符不转义-->
<#--<#import "/spring.ftl" as spring>-->
<#--<#ftl output_format="HTML" strip_whitespace=true>默认对html字符转义(安全性)-->

<#macro pageHeader>
    <meta charset="utf-8"/>
    <meta name="renderer" content="webkit"/>
    <meta name="force-rendering" content="webkit"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <link href="${web.cdn('/jx.css')}" rel="stylesheet"/>
    <#if sysWeb.getParam("sys.web.largeFont","false")=="true" && !request.getRequestUri()?contains("/login")>
        <link href="${web.cdn('/large.css')}" rel="stylesheet"/>
    </#if>
    <#nested/>
</#macro>
<#macro pageLoading>
    <div class="page-loading"></div>
</#macro>
<#macro pageFooter>
    <script src="${web.cdn('/jx.js')}" data-debug="false" data-root-path="${web.url("/")}" data-cdn="${web.cdnRoot()}"></script>
    <script src="${web.url('/sys.js')}"></script>
    <script>
        $.fn.jxgrid.defaults.pageSize = ${sysWeb.getParam("sys.web.gridPageSize","20")};
    </script>
    <#nested/>
</#macro>
<#macro editFormPageFooter>
    <@pageFooter/>
    <script>
        jx.ready(function () {
            window.editForm = new jx.GridEditFormDialog('#editform');
        });
    </script>
    <#nested/>
</#macro>
<#macro distributableDeptTreeOptions id="#ownDept" hiddenField="deptId" showClear="false" editable="false">
    <script>
        $('${id}').options({
            editable: ${editable},
            showClear: ${showClear},
            hiddenField: '${hiddenField}',
            panelHeight: '250px',
            treeOptions: {
                url: '${web.url("/sys/dept/distributableDeptTree")}',
                clickToggle: false,
                defaultIconCls: 'icon-people'
            }
        });
    </script>
</#macro>

<#--条件输出-->
<#macro echo test>
    <#if test>
        <#nested/>
    </#if>
</#macro>

<#--是否新建记录-->
<#macro isCreate>
    <#if _create_?? && _create_ == "1">
        <#nested/>
    </#if>
</#macro>

<#--是否编辑记录-->
<#macro isEdit>
    <#if !_create_?? || _create_ == "0" || _create_ == "">
        <#nested/>
    </#if>
</#macro>

<#function saveUrl base create="" edit="">
    <#if _create_?? && _create_ == "1">
        <#return "${springMacroRequestContext.getContextUrl(base+create)}">
    <#else>
        <#return "${springMacroRequestContext.getContextUrl(base+edit)}">
    </#if>
</#function>

<#--表单编辑对话框工具栏-->
<#macro editFormDialogCommand>
    <@isCreate>
        <button class="btn btn-success" type="button" onclick="editForm.continueSave()">
            <i class="icon-plus"></i> 连续新建
        </button>
    </@isCreate>
    <button class="btn btn-primary" type="button" onclick="editForm.save()">
        <i class="fa fa-save"></i> 保存
    </button>
    <button class="btn btn-default" type="button" onclick="editForm.cancel()">
        <i class="fa fa-sign-in"></i> 取消
    </button>
</#macro>

<#--tab操作日志表格-->
<#macro tabHistroyLog tableName primaryKey>
    <table class="jx-tab-histroy-log"
           data-options="queryParams:{tableName:'${tableName}',primaryKey:'${primaryKey}'}">
        <thead>
        <tr>
            <th data-options="title: '操作类型', field: 'category', width: 80, align: 'center',formatter: jx.sys.formatHistoryLogCategory"></th>
            <th data-options="title: '操作人', field: 'operateUserName', width: 120, align: 'left'"></th>
            <th data-options="title: '操作时间', field: 'operateDateTime', width: 170, align: 'left',sortable: true"></th>
        </tr>
        </thead>
    </table>
</#macro>

<#macro jobLogTable>
    <table id="grid" data-options="form:'#gridform',toolbar:'#gridtoolbar'">
        <thead>
        <tr>
            <th data-options="title:'任务名称',field:'jobName',width:200,align:'left',sortable: false"></th>
            <th data-options="title:'触发类型',field:'triggerCategory',width:100,align:'left',formatter:jx.sys.formatJobLogTriggerCategory"></th>
            <th data-options="title:'耗时', field: 'costTime', width: 100, align: 'center',sortable:true, formatter: jx.sys.formatJobLogCostTime"></th>
            <th data-options="title:'状态',field:'status',width:80,align:'left',sortable: false, formatter: jx.sys.formatJobLogStatus"></th>
            <th data-options="title:'任务消息',field:'msg',width:200,align:'left',sortable: false"></th>
            <th data-options="title:'开始时间',field:'startDateTime',width:160,align:'left',sortable: false"></th>
            <th data-options="title:'结束时间',field:'endDateTime',width:160,align:'left',sortable: false"></th>
            <th data-options="title:'操作日期',field:'operateDateTime',width:160,align:'left',sortable: true"></th>
        </tr>
        </thead>
    </table>
</#macro>

<#--引入UE脚本-->
<#macro ueScript>
    <script src="${web.url('/lib/ueditor/ueditor.config.js')}"></script>
    <script src="${web.url('/lib/ueditor/ueditor.all.min.js')}"></script>
</#macro>

<#--UE服务器路径-->
<#macro ueditorServerUrl>${web.siteFullUrl()}${request.getContextUrl("/ueditor/config")}</#macro>

<#--editormd图片上传服路径-->
<#macro mdEditorImageUploadURL>${web.siteFullUrl()}${request.getContextUrl("/editormd/upload")}</#macro>

<#--kindeditor文件上传服路径-->
<#macro kindeditorUploadUrl>${web.siteFullUrl()}${request.getContextUrl("/kindeditor/upload")}</#macro>

<#--kindeditor文件管理服路径-->
<#macro kindeditorFileManagerUrl>${web.siteFullUrl()}${request.getContextUrl("/kindeditor/manager")}</#macro>

<#--参数分类字典选项-->
<#macro dicSysParamCategoryOption selectedValue="">
    ${sysWeb.dicSelectOptions("sys.param.category",selectedValue)}
</#macro>
<#--用户职位字典选项-->
<#macro dicSysUserPostOption selectedValue="">
    ${sysWeb.dicSelectOptions("sys.user.post",selectedValue)}
</#macro>
<#--机构分类字典选项-->
<#macro dicSysDeptCategoryOption selectedValue="">
    ${sysWeb.dicSelectOptions("sys.dept.category",selectedValue)}
</#macro>
<#--机构性质字典选项-->
<#macro dicSysDeptNatureOption selectedValue="">
    ${sysWeb.dicSelectOptions("sys.dept.nature",selectedValue)}
</#macro>
<#--任务分类字典选项-->
<#macro dicSysJobCategorOption selectedValue="">
    ${sysWeb.dicSelectOptions("sys.job.category",selectedValue)}
</#macro>
<#--kindeditor文件上传服路径-->
<#macro kindeditorUploadUrl>${web.siteFullUrl("/kindeditor/upload")}</#macro>
<#--kindeditor文件管理服路径-->
<#macro kindeditorFileManagerUrl>${web.siteFullUrl("/kindeditor/manager")}</#macro>
<#--字典树Url-->
<#macro dicTreeUrl code>${web.url("/sys/dic/tree?code="+code)}</#macro>


<#include "/_eduWebHelp_layout.ftl">
<#include "/_html.ftl">